.d1 {
  border: 1px solid #ccc;
  width: 500px;
  display: flex;
  justify-content: space-between;
}
.d1 > #p1 {
  background: pink;
  width: 200px;
  height: 100px;
}
.d1 > #p1 span {
  color: blue;
}
.d1 > #p1 span:hover {
  color: red;
}
.d1 .d2 {
  background: #ccc;
}
.d1 .d2 span {
  color: green;
}
